package com.niit.beans;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author hanli
 * @date 2025/2/28
 * @description TODO
 */
public class Test {
    public static void main(String[] args) {

        // ApplicationContext 容器对象
        ApplicationContext ctx = new ClassPathXmlApplicationContext("config/spring-beans.xml");

        User user1 = (User)ctx.getBean("user");
        System.out.println(user1.getId());


        user1.teamwork();

    }
}